package com.hq.ims.data.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hq.ims.data.vo.CompanyServiceAreaMapstruct;
import com.hq.mybatis.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;

/**
 * @author 蒋柏平
 * @since 20241022
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Alias("CompanyServiceArea")
@TableName(value = "company_service_area")
@ApiModel(value = "企业服务区域", description = "企业服务区域")
public class CompanyServiceArea extends BaseModel<CompanyServiceArea> implements Serializable {

    @ApiModelProperty(value = "企业资质ID")
    @TableId(value = "company_service_area_id", type = IdType.ASSIGN_UUID)
    private String companyServiceAreaId;

    @ApiModelProperty(value = "主键")
    @TableField(value = "company_id")
    private String companyId;

    @ApiModelProperty(value = "省编码")
    @TableField(value = "province_code")
    private String provinceCode;

    @ApiModelProperty(value = "省名称")
    @TableField(value = "province_name")
    private String provinceName;

    @ApiModelProperty(value = "市编码")
    @TableField(value = "city_code")
    private String cityCode;

    @ApiModelProperty(value = "市名称")
    @TableField(value = "city_name")
    private String cityName;

    @ApiModelProperty(value = "区/县编码")
    @TableField(value = "district_code")
    private String districtCode;

    @ApiModelProperty(value = "区/县名称")
    @TableField(value = "district_name")
    private String districtName;

    @ApiModelProperty(value = "街道编码")
    @TableField(value = "street_code")
    private String streetCode;

    @ApiModelProperty(value = "街道名称")
    @TableField(value = "street_name")
    private String streetName;

    public CompanyServiceAreaMapstruct.CompanyServiceAreaRowAuthVo auth() {
        CompanyServiceAreaMapstruct.CompanyServiceAreaRowAuthVo auth = new CompanyServiceAreaMapstruct.CompanyServiceAreaRowAuthVo(this);
        return auth;
    }

}
